package com.zhengbing.tj.design.singleton;

/**
 * 饿汉式单例模式实现类
 * 特点：类加载时即初始化实例，线程安全但可能造成资源浪费
 * 
 * @author zhengbing
 * @date 2025-07-23
 */
public class EagerSingleton {
    private static final EagerSingleton instance = new EagerSingleton();

    private EagerSingleton() {}

    public static EagerSingleton getInstance() {
        return instance;
    }

    public void showMessage() {
        System.out.println("Eager Singleton Instance");
    }
}